<template>
  <view class="outer">
    <!-- <multi-choice :choice="[{ content: '有' }, { content: '无' }]" @choose="choose" v-if="!has" /> -->
    <!-- <answer v-if="has" /> -->

    <van-radio-group :value="checked">
      <van-cell-group inset>
        <van-cell
          v-for="(answer, index) in Answers"
          :key="index"
          :title="answer.content"
          clickable
          :data-name="answer.content"
          @click="onClick"
        >
          <template #right-icon>
            <van-radio :name="answer.content" />
          </template>
        </van-cell>
      </van-cell-group>
    </van-radio-group>
  </view>
</template>
<script>
export default {
    props: ["Answers"],
  data() {
    return {
    //   Answers: [
    //     {
    //       choice_id: 0,
    //       content: "选项A",
    //     },
    //     {
    //       choice_id: 1,
    //       content: "选项B",
    //     },
    //     {
    //       choice_id: 2,
    //       content: "选项C",
    //     },
    //   ],
      checked: null,
    };
  },
  methods: {
    // choose(e) {
    //   this.has = e;
    // }
    onChange(e) {
      console.log(e);
    },
    onClick(e) {
      this.checked = e.currentTarget.dataset.name;
      console.log(this.checked);
    },
  },
  watch: {
    checked() {
      this.$emit("choose", this.checked);
    },
  },
};
</script>
<style scoped>
.outer {
  height: 100%;
}
</style>>